package com.msb.order.service;

import com.msb.order.factory.FallbackOrderFeignServiceFactory;
import com.msb.order.util.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

//value用于指定调用nacos下哪个微服务
//fallbackFactory指定限流处理类
@FeignClient(value = "msb-user",fallbackFactory = FallbackOrderFeignServiceFactory.class)
public interface UserFeignService {
    @GetMapping("/user/{userId}")
    Result getUserName(@PathVariable Integer userId);
}
